// config/config.prod.js
'use strict';

module.exports = () => {
  return {
    cluster: {
      listen: {
        port: 9001,
        hostname: '0.0.0.0',
      }
    },
    sequelize: {
      dialect: 'mysql',
      host: process.env.DB_HOST || '127.0.0.1',
      port: 3306,
      database: 'lingxi_system',
      username: 'root',
      password: process.env.DB_PASSWORD || '888mei525',
      timezone: '+08:00',
      dialectOptions: {
        charset: 'utf8mb4'
      }
    },
    redis: {
      client: {
        port: 6379,
        host: process.env.REDIS_HOST || '127.0.0.1',
        password: '',
        db: 0,
      }
    },
    security: {
      csrf: {
        enable: false,
      },
    },
    jwt: {
      secret: process.env.JWT_SECRET || 'lingxi-jwt-secret',
    },
    uploadDir: './uploads'
  };
};